// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;

namespace SnapObjects.Data.DB2
{
    public class DB2SqlKeywords : SqlKeywords
    {
        private static readonly IDictionary<string, SqlKeywords> _sqlmembers
            = new Dictionary<string, SqlKeywords>(_members, StringComparer.OrdinalIgnoreCase);

        protected DB2SqlKeywords(string name) : base(name)
        {

        }

        protected override void Register(string name)
        {
            if (!_sqlmembers.ContainsKey(name))
            {
                _sqlmembers.Add(name, this);
            }

            _name = name;
        }

        public static new bool IsKeyword(string value)
        {
            return _sqlmembers.ContainsKey(value);
        }

        public static new SqlKeywords Parse(string value)
        {
            if (_sqlmembers.ContainsKey(value))
            {
                return _sqlmembers[value];
            }

            return NOTHING;
        }

        public static readonly DB2SqlKeywords AFTER = new DB2SqlKeywords("AFTER");
        public static readonly DB2SqlKeywords ALLOW = new DB2SqlKeywords("ALLOW");
        public static readonly DB2SqlKeywords ALTERAND = new DB2SqlKeywords("ALTERAND");
        public static readonly DB2SqlKeywords ASENSITIVE = new DB2SqlKeywords("ASENSITIVE");
        public static readonly DB2SqlKeywords ASSOCIATE = new DB2SqlKeywords("ASSOCIATE");
        public static readonly DB2SqlKeywords ASUTIME = new DB2SqlKeywords("ASUTIME");
        public static readonly DB2SqlKeywords AUDIT = new DB2SqlKeywords("AUDIT");
        public static readonly DB2SqlKeywords AUX = new DB2SqlKeywords("AUX");
        public static readonly DB2SqlKeywords AUXILIARY = new DB2SqlKeywords("AUXILIARY");
        
        public static readonly DB2SqlKeywords BEFORE = new DB2SqlKeywords("BEFORE");
        public static readonly DB2SqlKeywords BUFFERPOOL = new DB2SqlKeywords("BUFFERPOOL");

        public static readonly DB2SqlKeywords CALL = new DB2SqlKeywords("CALL");
        public static readonly DB2SqlKeywords CAPTURE = new DB2SqlKeywords("CAPTURE");
        public static readonly DB2SqlKeywords CCSID = new DB2SqlKeywords("CCSID");
        public static readonly DB2SqlKeywords CLONE = new DB2SqlKeywords("CLONE");
        public static readonly DB2SqlKeywords CLUSTER = new DB2SqlKeywords("CLUSTER");
        public static readonly DB2SqlKeywords COLLECTION = new DB2SqlKeywords("COLLECTION");
        public static readonly DB2SqlKeywords COLLID = new DB2SqlKeywords("COLLID");
        public static readonly DB2SqlKeywords COMMENT = new DB2SqlKeywords("COMMENT");
        public static readonly DB2SqlKeywords CONCAT = new DB2SqlKeywords("CONCAT");
        public static readonly DB2SqlKeywords CONDITION = new DB2SqlKeywords("CONDITION");
        public static readonly DB2SqlKeywords CONTAINS = new DB2SqlKeywords("CONTAINS");
        public static readonly DB2SqlKeywords CONTENT = new DB2SqlKeywords("CONTENT");
        public static readonly DB2SqlKeywords CUBE = new DB2SqlKeywords("CUBE");
        public static readonly DB2SqlKeywords CURRENT_LC_CTYPE = new DB2SqlKeywords("CURRENT_LC_CTYPE");
        public static readonly DB2SqlKeywords CURRENT_PATH = new DB2SqlKeywords("CURRENT_PATH");
        public static readonly DB2SqlKeywords CURRENT_SCHEMA = new DB2SqlKeywords("CURRENT_SCHEMA");
        public static readonly DB2SqlKeywords CURRVAL = new DB2SqlKeywords("CURRVAL");

        public static readonly DB2SqlKeywords DATA = new DB2SqlKeywords("DATA");
        public static readonly DB2SqlKeywords DATABASE = new DB2SqlKeywords("DATABASE");
        public static readonly DB2SqlKeywords DBINFO = new DB2SqlKeywords("DBINFO");
        public static readonly DB2SqlKeywords DETERMINISTIC = new DB2SqlKeywords("DETERMINISTIC");
        public static readonly DB2SqlKeywords DISABLE = new DB2SqlKeywords("DISABLE");
        public static readonly DB2SqlKeywords DISALLOW = new DB2SqlKeywords("DISALLOW");
        public static readonly DB2SqlKeywords DO = new DB2SqlKeywords("DO");
        public static readonly DB2SqlKeywords DOCUMENT = new DB2SqlKeywords("DOCUMENT");
        public static readonly DB2SqlKeywords DSSIZE = new DB2SqlKeywords("DSSIZE");
        public static readonly DB2SqlKeywords DYNAMIC = new DB2SqlKeywords("DYNAMIC");

        public static readonly DB2SqlKeywords EDITPROC = new DB2SqlKeywords("EDITPROC");
        public static readonly DB2SqlKeywords ELSEIF = new DB2SqlKeywords("ELSEIF");
        public static readonly DB2SqlKeywords ENCODING = new DB2SqlKeywords("ENCODING");
        public static readonly DB2SqlKeywords ENCRYPTION = new DB2SqlKeywords("ENCRYPTION");
        public static readonly DB2SqlKeywords ENDING = new DB2SqlKeywords("ENDING");
        public static readonly DB2SqlKeywords END_EXEC = new DB2SqlKeywords("END-EXEC");
        public static readonly DB2SqlKeywords ERASE = new DB2SqlKeywords("ERASE");
        public static readonly DB2SqlKeywords EXIT = new DB2SqlKeywords("EXIT");
        public static readonly DB2SqlKeywords EXPLAIN = new DB2SqlKeywords("EXPLAIN");

        public static readonly DB2SqlKeywords FENCED = new DB2SqlKeywords("FENCED");
        public static readonly DB2SqlKeywords FIELDPROC = new DB2SqlKeywords("FIELDPROC");
        public static readonly DB2SqlKeywords FINAL = new DB2SqlKeywords("FINAL");
        public static readonly DB2SqlKeywords FREE = new DB2SqlKeywords("FREE");
        public static readonly DB2SqlKeywords FUNCTION = new DB2SqlKeywords("FUNCTION");

        public static readonly DB2SqlKeywords GENERATED = new DB2SqlKeywords("GENERATED");

        public static readonly DB2SqlKeywords HNADLER = new DB2SqlKeywords("HNADLER");
        public static readonly DB2SqlKeywords HOLD = new DB2SqlKeywords("HOLD");
        public static readonly DB2SqlKeywords HOURS = new DB2SqlKeywords("HOURS");

        public static readonly DB2SqlKeywords IF = new DB2SqlKeywords("IF");
        public static readonly DB2SqlKeywords INCLUSIVE = new DB2SqlKeywords("INCLUSIVE");
        public static readonly DB2SqlKeywords INHERIT = new DB2SqlKeywords("INHERIT");
        public static readonly DB2SqlKeywords INOUT = new DB2SqlKeywords("INOUT");
        public static readonly DB2SqlKeywords ISOBID = new DB2SqlKeywords("ISOBID");
        public static readonly DB2SqlKeywords ITERATE = new DB2SqlKeywords("ITERATE");

        public static readonly DB2SqlKeywords JAR = new DB2SqlKeywords("JAR");

        public static readonly DB2SqlKeywords KEEP = new DB2SqlKeywords("KEEP");

        public static readonly DB2SqlKeywords LABEL = new DB2SqlKeywords("LABEL");
        public static readonly DB2SqlKeywords LC_CTYPE = new DB2SqlKeywords("LC_CTYPE");
        public static readonly DB2SqlKeywords LEAVE = new DB2SqlKeywords("LEAVE");
        public static readonly DB2SqlKeywords LIMIT = new DB2SqlKeywords("LIMIT");
        public static readonly DB2SqlKeywords LOCALE = new DB2SqlKeywords("LOCALE");
        public static readonly DB2SqlKeywords LOCATOR = new DB2SqlKeywords("LOCATOR");
        public static readonly DB2SqlKeywords LOCATORS = new DB2SqlKeywords("LOCATORS");
        public static readonly DB2SqlKeywords LOCK = new DB2SqlKeywords("LOCK");
        public static readonly DB2SqlKeywords LOCKMAX = new DB2SqlKeywords("LOCKMAX");
        public static readonly DB2SqlKeywords LOCKSIZE = new DB2SqlKeywords("LOCKSIZE");
        public static readonly DB2SqlKeywords LONG = new DB2SqlKeywords("LONG");
        public static readonly DB2SqlKeywords LOOP = new DB2SqlKeywords("LOOP");
        
        public static readonly DB2SqlKeywords MAINTAINED = new DB2SqlKeywords("MAINTAINED");
        public static readonly DB2SqlKeywords MATERIALIZED = new DB2SqlKeywords("MATERIALIZED");
        public static readonly DB2SqlKeywords MICROSECOND = new DB2SqlKeywords("MICROSECOND");
        public static readonly DB2SqlKeywords MICROSECONDS = new DB2SqlKeywords("MICROSECONDS");
        public static readonly DB2SqlKeywords MINUTEMINUTES = new DB2SqlKeywords("MINUTEMINUTES");
        public static readonly DB2SqlKeywords MODIFIES = new DB2SqlKeywords("MODIFIES");
        public static readonly DB2SqlKeywords MONTHS = new DB2SqlKeywords("MONTHS");

        public static readonly DB2SqlKeywords NEXTVAL = new DB2SqlKeywords("NEXTVAL");
        public static readonly DB2SqlKeywords NULLS = new DB2SqlKeywords("NULLS");
        public static readonly DB2SqlKeywords NUMPARTS = new DB2SqlKeywords("NUMPARTS");

        public static readonly DB2SqlKeywords OBID = new DB2SqlKeywords("OBID");
        public static readonly DB2SqlKeywords OLD = new DB2SqlKeywords("OLD");
        public static readonly DB2SqlKeywords OFFSET = new DB2SqlKeywords("OFFSET");
        public static readonly DB2SqlKeywords OPTIMIZATION = new DB2SqlKeywords("OPTIMIZATION");
        public static readonly DB2SqlKeywords OPTIMIZE = new DB2SqlKeywords("OPTIMIZE");
        public static readonly DB2SqlKeywords ORGANIZATION = new DB2SqlKeywords("ORGANIZATION");
        public static readonly DB2SqlKeywords OUT = new DB2SqlKeywords("OUT");

        public static readonly DB2SqlKeywords PACKAGE = new DB2SqlKeywords("PACKAGE");
        public static readonly DB2SqlKeywords PARAMETER = new DB2SqlKeywords("PARAMETER");
        public static readonly DB2SqlKeywords PART = new DB2SqlKeywords("PART");
        public static readonly DB2SqlKeywords PADDED = new DB2SqlKeywords("PADDED");
        public static readonly DB2SqlKeywords PARTITIONED = new DB2SqlKeywords("PARTITIONED");
        public static readonly DB2SqlKeywords PARTITIONING = new DB2SqlKeywords("PARTITIONING");
        public static readonly DB2SqlKeywords PATH = new DB2SqlKeywords("PATH");
        public static readonly DB2SqlKeywords PIECESIZE = new DB2SqlKeywords("PIECESIZE");
        public static readonly DB2SqlKeywords PERIOD = new DB2SqlKeywords("PERIOD");
        public static readonly DB2SqlKeywords PLAN = new DB2SqlKeywords("PLAN");
        public static readonly DB2SqlKeywords PREVVAL = new DB2SqlKeywords("PREVVAL");
        public static readonly DB2SqlKeywords PRIQTY = new DB2SqlKeywords("PRIQTY");
        public static readonly DB2SqlKeywords PROGRAM = new DB2SqlKeywords("PROGRAM");
        public static readonly DB2SqlKeywords PSID = new DB2SqlKeywords("PSID");

        public static readonly DB2SqlKeywords QUERY = new DB2SqlKeywords("QUERY");
        public static readonly DB2SqlKeywords QUERYNO = new DB2SqlKeywords("QUERYNO");

        public static readonly DB2SqlKeywords READS = new DB2SqlKeywords("READS");
        public static readonly DB2SqlKeywords REFRESH = new DB2SqlKeywords("REFRESH");
        public static readonly DB2SqlKeywords RESIGNAL = new DB2SqlKeywords("RESIGNAL");
        public static readonly DB2SqlKeywords RELEASE = new DB2SqlKeywords("RELEASE");
        public static readonly DB2SqlKeywords RENAME = new DB2SqlKeywords("RENAME");
        public static readonly DB2SqlKeywords REPEAT = new DB2SqlKeywords("REPEAT");
        public static readonly DB2SqlKeywords RESULT = new DB2SqlKeywords("RESULT");
        public static readonly DB2SqlKeywords RESULT_SET_LOCATOR = new DB2SqlKeywords("RESULT_SET_LOCATOR");
        public static readonly DB2SqlKeywords RETURN = new DB2SqlKeywords("RETURN");
        public static readonly DB2SqlKeywords RETURNS = new DB2SqlKeywords("RETURNS");
        public static readonly DB2SqlKeywords ROLE = new DB2SqlKeywords("ROLE");
        public static readonly DB2SqlKeywords ROLLUP = new DB2SqlKeywords("ROLLUP");
        public static readonly DB2SqlKeywords ROUND_CEILING = new DB2SqlKeywords("ROUND_CEILING");
        public static readonly DB2SqlKeywords ROUND_DOWN = new DB2SqlKeywords("ROUND_DOWN");
        public static readonly DB2SqlKeywords ROUND_FLOOR = new DB2SqlKeywords("ROUND_FLOOR");
        public static readonly DB2SqlKeywords ROUND_HALF_DOWN = new DB2SqlKeywords("ROUND_HALF_DOWN");
        public static readonly DB2SqlKeywords ROUND_HALF_EVEN = new DB2SqlKeywords("ROUND_HALF_EVEN");
        public static readonly DB2SqlKeywords ROUND_HALF_UP = new DB2SqlKeywords("ROUND_HALF_UP");
        public static readonly DB2SqlKeywords ROUND_UP = new DB2SqlKeywords("ROUND_UP");
        public static readonly DB2SqlKeywords ROW = new DB2SqlKeywords("ROW");
        public static readonly DB2SqlKeywords ROWSET = new DB2SqlKeywords("ROWSET");
        public static readonly DB2SqlKeywords RUN = new DB2SqlKeywords("RUN");

        public static readonly DB2SqlKeywords SAVEPOINT = new DB2SqlKeywords("SAVEPOINT");
        public static readonly DB2SqlKeywords SCRATCHPAD = new DB2SqlKeywords("SCRATCHPAD");
        public static readonly DB2SqlKeywords SECONDS = new DB2SqlKeywords("SECONDS");
        public static readonly DB2SqlKeywords SECQTY = new DB2SqlKeywords("SECQTY");
        public static readonly DB2SqlKeywords SECURITY = new DB2SqlKeywords("SECURITY");
        public static readonly DB2SqlKeywords SEQUENCE = new DB2SqlKeywords("SEQUENCE");
        public static readonly DB2SqlKeywords SENSITIVE = new DB2SqlKeywords("SENSITIVE");
        public static readonly DB2SqlKeywords SIGNAL = new DB2SqlKeywords("SIGNAL");
        public static readonly DB2SqlKeywords SIMPLE = new DB2SqlKeywords("SIMPLE");
        public static readonly DB2SqlKeywords SOURCE = new DB2SqlKeywords("SOURCE");
        public static readonly DB2SqlKeywords SPECIFIC = new DB2SqlKeywords("SPECIFIC");
        public static readonly DB2SqlKeywords STANDARD = new DB2SqlKeywords("STANDARD");
        public static readonly DB2SqlKeywords STATIC = new DB2SqlKeywords("STATIC");
        public static readonly DB2SqlKeywords STATEMENT = new DB2SqlKeywords("STATEMENT");
        public static readonly DB2SqlKeywords STAY = new DB2SqlKeywords("STAY");
        public static readonly DB2SqlKeywords STOGROUP = new DB2SqlKeywords("STOGROUP");
        public static readonly DB2SqlKeywords STORES = new DB2SqlKeywords("STORES");
        public static readonly DB2SqlKeywords STYLE = new DB2SqlKeywords("STYLE");
        public static readonly DB2SqlKeywords SUMMARY = new DB2SqlKeywords("SUMMARY");
        public static readonly DB2SqlKeywords SYNONYM = new DB2SqlKeywords("SYNONYM");
        public static readonly DB2SqlKeywords SYSDATE = new DB2SqlKeywords("SYSDATE");
        public static readonly DB2SqlKeywords SYSTEM = new DB2SqlKeywords("SYSTEM");
        public static readonly DB2SqlKeywords SYSTIMESTAMP = new DB2SqlKeywords("SYSTIMESTAMP");

        public static readonly DB2SqlKeywords TABLESPACE = new DB2SqlKeywords("TABLESPACE");
        public static readonly DB2SqlKeywords TRIGGER = new DB2SqlKeywords("TRIGGER");
        public static readonly DB2SqlKeywords TRUNCATE = new DB2SqlKeywords("TRUNCATE");
        public static readonly DB2SqlKeywords TYPE = new DB2SqlKeywords("TYPE");
        public static readonly DB2SqlKeywords UNDO = new DB2SqlKeywords("UNDO");
        public static readonly DB2SqlKeywords UNTIL = new DB2SqlKeywords("UNTIL");

        public static readonly DB2SqlKeywords VALIDPROC = new DB2SqlKeywords("VALIDPROC");
        public static readonly DB2SqlKeywords VARIABLE = new DB2SqlKeywords("VARIABLE");
        public static readonly DB2SqlKeywords VCAT = new DB2SqlKeywords("VCAT");
        public static readonly DB2SqlKeywords VOLATILE = new DB2SqlKeywords("VOLATILE");
        public static readonly DB2SqlKeywords VOLUMES = new DB2SqlKeywords("VOLUMES");

        public static readonly DB2SqlKeywords WHILE = new DB2SqlKeywords("WHILE");
        public static readonly DB2SqlKeywords WLM = new DB2SqlKeywords("WLM");

        public static readonly DB2SqlKeywords XMLEXISTS = new DB2SqlKeywords("XMLEXISTS");
        public static readonly DB2SqlKeywords XMLNAMESPACES = new DB2SqlKeywords("XMLNAMESPACES");
        public static readonly DB2SqlKeywords XMLCAST = new DB2SqlKeywords("XMLCAST");

        public static readonly DB2SqlKeywords YEARS = new DB2SqlKeywords("YEARS");
    }
}
